import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Log from './views/system/Log.vue'
import onlineUser from './views/system/onlineUser.vue'
import Role from './views/system/Role.vue'
import sysParam from './views/system/sysParam.vue'
import Resource from './views/system/Resource.vue'
import Users from './views/system/Users.vue'
import setUser from './views/system/setUser'
import Instructor from './views/enjoylove/instructor.vue'
import Customer from './views/enjoylove/customer.vue'
import Order from './views/enjoylove/order.vue'
import OrderDetail from './views/enjoylove/order_detail.vue'
import ProductIntroduction from './views/enjoylove/products/productIntroduction.vue'
import ProductList from './views/enjoylove/products/productList.vue'
import ProductClassify from './views/enjoylove/products/productClassify.vue'
import RemoveCategory from './views/enjoylove/products/removeCategory.vue'
import AddCategory from './views/enjoylove/products/addCategory.vue'
import ReviseProduct from './views/enjoylove/products/reviseProduct.vue'

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },

    {
        path: '/',
        perm: '',
        code: '10010',
        component: Home,
        name: '辅导信息',
        iconCls: 'el-icon-view',
        leaf: true,
        children: [
            { path: '/instructor', component: Instructor, name: '辅导信息' ,code:"30010"}
        ]
    },
    {
        path: '/',
        perm: '',
        code: '10020',
        component: Home,
        name: '客户信息',
        iconCls: 'el-icon-info',
        leaf: true,
        children: [
            { path: '/customer', component: Customer, name: '客户信息' ,code:"30010"}
        ]
    },
    {
        path: '/',
        perm: '',
        code: '10030',
        component: Home,
        name: '商品管理',
        iconCls: 'el-icon-menu',
        children: [
            { path: '/product_introduction', component: ProductIntroduction, name: '导入新品' ,code:"30020"},
            { path: '/product_list', component: ProductList, name: '商品信息' ,code:"30030"},
            { path: '/product_classify', component: ProductClassify, name: '商品分类' ,code:"30010"},
            { path: '/remove_category', component: RemoveCategory, name: '商品删除' ,code:"", hidden: true},
            { path: '/add_category', component: AddCategory, name: '商品添加', code:"", hidden: true},
            { path: '/revise_product', component: ReviseProduct, name: '编辑商品', code:"", hidden: true}
        ]
    },
    {
        path: '/',
        perm: '',
        code: '10050',
        component: Home,
        name: '订单信息',
        iconCls: 'el-icon-tickets',
        leaf: true,
        children: [

            { path: '/order', component: Order, name: '订单信息' ,code:"30010"},
            {   path: '/order_detail', component: OrderDetail, name: '订单详情' ,code:"30030"},

        ]
    },

    {
        path: '/',
        perm:'',
        code:'100000',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-setting',
        children: [
            { path: '/users', component: Users, name: '用户管理' ,code:"103500"},
            { path: '/resource', component: Resource, name: '资源管理',code:"103000"},
            { path: '/role', component: Role, name: '角色管理' ,code:"102500"},
            { path: '/onlineuser', component: onlineUser, name: '在线用户' ,code:"102000"},
            { path: '/log', component: Log, name: '行为日志' ,code:"100500"},
            { path: '/sysparam', component: sysParam, name: '系统参数' ,code:"101000"},
            { path: '/setuser', component: setUser, name: '个人设置',hidden: true },
        ]
    },

    //{ path: '/main', component: Main },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];



export default routes;